<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>学生注册</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/plugins/markdown/bootstrap-markdown.min.css"/>
    <link href="css/style.css?v=4.1.0" rel="stylesheet">

</head>

<body>
<div class="col-sm-6">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>学生注册</h5>
        </div>
        <div class="ibox-content">
            <form class="form-horizontal m-t" id="form1" action="studentadd.action?type=1" method="post">
                <div class="form-group">
                    <label class="col-sm-3 control-label">姓名：</label>
                    <div class="col-sm-8">
                        <input id="sname" name="sname" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">性别：</label>
                    <div class="col-sm-8">
                        <input name="ssex" class="" type="radio" value="男" checked="checked">男
                        <input name="ssex" class="" type="radio" value="女">女
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">电话：</label>
                    <div class="col-sm-8">
                        <input id="stel" name="stel" type="text">
                        <span class="help-block m-b-none" id="mess" style="color: red"><i class="fa fa-info-circle"></i></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">年龄：</label>
                    <div class="col-sm-8">
                        <input id="sage" name="sage" class="form-control" type="text">

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">密码：</label>
                    <div class="col-sm-8">
                        <input id="password" name="password" class="form-control" type="password">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">确认密码：</label>
                    <div class="col-sm-8">
                        <input id="repassword" name="repassword" class="form-control" type="password">
                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的密码</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">学院：</label>
                    <div class="col-sm-8">
                        <select name="colid">
                            <c:forEach items="${collegelist}" var="college">
                                <option value="${college.colid}">${college.colname}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">年级：</label>
                    <div class="col-sm-8">
                        <select name="gid">
                            <c:forEach items="${gradelist}" var="grade">
                                <option value="${grade.gid}">${grade.gname}</option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-3">
                        <button class="btn btn-primary" type="button" onclick="myformsubmit()">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>

<!-- simditor -->
<script type="text/javascript" src="js/plugins/markdown/markdown.js"></script>
<script type="text/javascript" src="js/plugins/markdown/to-markdown.js"></script>
<script type="text/javascript" src="js/plugins/markdown/bootstrap-markdown.js"></script>
<script type="text/javascript" src="js/plugins/markdown/bootstrap-markdown.zh.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/student_regist.js"></script>
</script>
<script>
    $(function () {
        $('#stel').blur(function () {
            var stel = $('#stel').val();
            $.post("telcheck.action", {tel: stel, user: 'student'}, function (data) {
                if (data == "true") {
                    $("#mess").html("电话已存在");
                } else {
                    $("#mess").html("");
                }
            });
        });
    })
</script>

</body>

</html>
